package com.sz.mes.excel.model;

import java.util.Date;
import java.lang.Double;
import java.math.BigDecimal;
import java.util.List;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.diboot.core.util.D;
import com.diboot.core.util.V;
import com.diboot.file.excel.BaseExcelModel;
import com.diboot.file.excel.annotation.ExcelBindDict;
import com.diboot.file.excel.annotation.ExcelBindField;
import com.diboot.file.excel.annotation.ExcelOption;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Getter;
import lombok.Setter;
import com.sz.mes.entity.Goods;
import com.diboot.iam.entity.IamUser;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.sz.mes.entity.Instock;

/**
* 入库 导入model定义
* @author hem
* @version 1.0
* @date 2023-06-07
* Copyright © szhs
*/
@Getter @Setter
@ExcelIgnoreUnannotated
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 1)
public class InstockImportModel extends BaseExcelModel {
	
    /**
     * 入库单号
     */
    @Length(max=100, message="入库单号长度应小于100")
    @ExcelProperty(value = "入库单号")
    private String acceptanceNum;	
    /**
     * 商品
     */
    @ExcelBindField(entity = Goods.class, field = "goodsName", setIdField = "goodsId")
    @ExcelProperty(value = "商品")
    private String goodsGoodsName;
    
    private Long goodsId;
	
    /**
     * 计划数量
     */
    @ExcelProperty(value = "计划数量")
    private Long planAmount;	
    /**
     * 入库数量
     */
    @ExcelProperty(value = "入库数量")
    private Integer quantity;	
    /**
     * 备注
     */
    @Length(max=100, message="备注长度应小于100")
    @ExcelProperty(value = "备注")
    private String remarks;	
    /**
     * 入库时间
     */
    @DateTimeFormat(D.FORMAT_DATETIME_Y4MDHMS)
    @JsonFormat(pattern = D.FORMAT_DATETIME_Y4MDHMS)
    @ExcelProperty(value = "入库时间")
    private Date instockTime;	
    /**
     * 批号
     */
    @Length(max=100, message="批号长度应小于100")
    @ExcelProperty(value = "批号")
    private String batchNum;	
    /**
     * 入库类型
     */
    @Length(max=100, message="入库类型长度应小于100")
    @ExcelOption(dict = Instock.DICT_RECEIPT_TYPE)
    @ExcelBindDict(type = Instock.DICT_RECEIPT_TYPE)
    @ExcelProperty(value = "入库类型")
    private String receiptType;	
    /**
     * 更新人
     */
    @ExcelBindField(entity = IamUser.class, field = "realname", setIdField = "updateBy")
    @ExcelProperty(value = "更新人")
    private String updateByName;
    
    private Long updateBy;

}